# coding=utf-8
import datetime
from django.core.management.base import BaseCommand
from optparse import make_option

from mongoutils.mongoutils import MongoHelper


class Command(BaseCommand):
    option_list = BaseCommand.option_list + (
        make_option('--long', '-l', dest='long',
            help='Help for the long options'),
                                             )
    help = 'Help text goes here'

    def handle(self, **options):
        mongoHelper = MongoHelper()
        newDate = datetime.datetime.now() - datetime.timedelta(days=15)
        date =  unicode(newDate.strftime("%A %B %d, %Y"))
        mongoHelper.removeDocumentByDate(date)
        pass
        
        
        
        
